package mf;

import org.apache.commons.lang3.ArrayUtils;

import java.awt.*;

/**
 * Created by Adiljan on 2016-10-30.
 */
public class Face {
	private Block[] data = new Block[9];
	/**
	 * 对面
	 */
	private Face across;
	/**
	 * 上面
	 */
	private Face top;
	/**
	 * 下面
	 */
	private Face bottom;
	/**
	 * 右面
	 */
	private Face right;
	/**
	 * 左面
	 */
	private Face left;
	private String colorName;

	public Face(Color color, String colorName) {
		this.colorName = colorName;
		for (int i = 0; i < data.length; i++) {
			data[i] = new Block(i + 1, colorName, color);
		}
	}

	public Face getAcross() {
		return across;
	}

	public void setAcross(Face across) {
		this.across = across;
	}

	public Face getTop() {
		return top;
	}

	public void setTop(Face top) {
		this.top = top;
	}

	public Face getBottom() {
		return bottom;
	}

	public void setBottom(Face bottom) {
		this.bottom = bottom;
	}

	public Face getRight() {
		return right;
	}

	public void setRight(Face right) {
		this.right = right;
	}

	public Face getLeft() {
		return left;
	}

	public void setLeft(Face left) {
		this.left = left;
	}

	public Block[] getData() {
		return data;
	}

	public void setData(Block[] data) {
		this.data = data;
	}

	public String getColorName() {
		return colorName;
	}

	public void setColorName(String colorName) {
		this.colorName = colorName;
	}

	@Override
	public String toString() {
		return ArrayUtils.toString(data);
	}
}
